1. Field of the Invention
The present invention relates to a method of and an apparatus for extracting a contour line (also referred to as "contour line data") from a line drawing (also referred to as "line drawing data") which represents a binary image (also referred to as "binary image data"), and a workstation with a contour line extracting function.
2. Description of the Related Art
When a contour line is extracted from a line drawing by computerized processing, it is possible to easily generate a line drawing that represents a stressed contour line of the line drawing, e.g., a shadowed character or an outlined character. For stressing a line drawing, it is often necessary to extract a contour line from the line drawing.
For extracting contour line data from line drawing data according to computerized processing, it has heretofore been customary to extract a contour line based on the principles of 8-connected pixels using a 3.times.3 mask, from bit map data stored in a memory.
One conventional process of extracting contour line data from line drawing data using a 3.times.3 mask will be described below with reference to FIG. 7 of the accompanying drawings. As shown in FIG. 7, a raster scanning process for looking for a track start point is carried out from an upper left pixel (bit) 4 in a designated area (line drawing data) 2 in a bit map line drawing. In the raster scanning process, every pixel is checked for a pixel value successively horizontally from the upper left pixel 4, and when one line has been checked, one line is shifted downwardly, and every pixel is checked for a pixel value successively horizontally in a next line from a pixel beneath the upper left pixel 4.
In FIG. 7, when a first pixel representing an image is found, i.e., when a pixel whose pixel data has a bit value of 1 (logic 1) is found, that pixel is used as a track start point (also referred to as "track start coordinated" or "track start pixel") 8 for a line drawing (image) 6. Then, the central pixel of the 3.times.3 mask is aligned with the track start point 8, and mask pixels are checked clockwise or counterclockwise (clockwise in FIG. 7) around the central pixel for their pixel values. If a mask pixel having a bit value of 1, i.e., a mask pixel representing an image, is found in the 3.times.3 mask, then the found mask pixel is selected and used as a track image coordinate 10.
Then, the central pixel of the 3.times.3 mask is aligned with the track image coordinate 10. The above cycle is repeated until the central pixel of the 3.times.3 mask reaches the first image position (pixel position), i.e., the track start point 8, for thereby automatically finding contour line data of an image that is made up of interconnected pixels which are marked with dots.
According to the above process of extracting contour line data by tracking every white/black boundary pixel on the bit map of the line drawing data 2, however, it is necessary to check pixels of about 64 MB if the line drawing data is of an A4 size and has a resolution of 2400 dpi, and pixels of about 256 MB if the line drawing data is of an A2 size. At any rate, the amount of data to be processed is very large. Therefore, the processing of the required data is time-consuming. Furthermore, since the bit map data takes a large memory capacity for storage, the cost of the hardware that is required is also large. These problems are aggravated if the resolution needs to be double because the number of pixels to be handled is four times greater.
For example, extracting contour line data, using a 3.times.3 mask, from line drawing data which is of an A4 size, has a resolution of 1200 dpi, and contains about 1 MB of pixels whose bit value is 1, takes a hardware arrangement having a certain capability about 90 seconds (one and a half minute) to complete the extracting process. According to a process of using a 3.times.3 mask, it takes about 400 seconds (a little less than 7 minutes) to extract contour line data from line drawing data which is of an A4 size, has a resolution of 2400 dpi, and contains about 3 MB of pixels whose bit value is 1.